﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TA/TA.Master" AutoEventWireup="true" CodeBehind="TA_Courses.aspx.cs" Inherits="TAMS.TA.Courses" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style2
        {
            text-align: left;
        }
        .style3
        {
            color: #0066FF;
            font-weight: bold;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p class="style3">
        Courses</p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="Course Id" DataSourceID="SqlDataSource1" 
        ForeColor="#333333" GridLines="None" Height="16px" 
        style="margin-left: 0px" Width="327px" HorizontalAlign="Center">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="Course Id" HeaderText="Course Id" ReadOnly="True" 
                SortExpression="Course Id" />
            <asp:BoundField DataField="Course Name" HeaderText="Course Name" SortExpression="Course Name" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TAMSConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:TAMSConnectionString.ProviderName %>" 
        SelectCommand="SELECT C.cid as 'Course Id', C.sectionNo as 'Section No', S.cname as 'Course Name' FROM sectionconsists C, educates E, course S WHERE E.secCorsId = C.secCorsId AND E.ta_sid = @asd AND C.cid = S.cid">
        
         <selectparameters>
        <asp:sessionparameter name ="asd" SessionField = "userName" DefaultValue="20000000" />
        </selectparameters> 
        </asp:SqlDataSource>

    

    &nbsp;
    <asp:Label ID="Label1" runat="server" Text="No Course Loaded" Visible="False"></asp:Label>
</asp:Content>
